package com.mccken.designpattern.strategy.strategy_02;

/**
 * 活动促销方案，它是一个上下文
 * 
 * @program: mccken-collect
 * @description:
 * @author: mccken
 * @create: 2024-01-14 20:38
 **/
public class PromotionActivity {
	
	private final IPromotionStrategy strategy;
	public PromotionActivity(IPromotionStrategy strategy) {
		this.strategy = strategy;
	}
	
	public double execute(double price) {
		return strategy.doPromotion(price);
	} 
	
}
